package com.hustbaidu.hustmapplacepro2;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.SimpleAdapter;

public class ScoreAddActivity extends Activity {
	private ListView listView;	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.score_add_layout);
		
		listView = (ListView)findViewById(R.id.scorelist);
		SimpleAdapter adapter = new SimpleAdapter(this, getData(), R.layout.score_detail_layout, 				
				new String[]{"score_text","score_person","score_time"}, 
				new int[]{R.id.score_text,R.id.score_person,R.id.score_time});
		listView.setAdapter(adapter);
				
	}
	private List<Map<String, Object>> getData(){
		List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
		Map<String, Object> map = null;
		
		
			map = new HashMap<String, Object>();
			map.put("score_text", "面点和烧烤比较好吃");
			map.put("score_person", "来自" + "Mary Peter");
			map.put("score_time", "12-09-08 21:02");
			list.add(map);
			map = new HashMap<String, Object>();
			map.put("score_text", "环境很好，不愧是华科最好吃的食堂");
			map.put("score_person", "来自" + "苏妲己");
			map.put("score_time", "12-09-28 11:22");
			
			list.add(map);
			map = new HashMap<String, Object>();
			map.put("score_text", "百景比较干净，百景比较干净，百景比较干净，百景比较干净，百景比较干净，百景比较干净，");
			map.put("score_person", "来自" + "教你做个K歌高手");
			map.put("score_time", "12-09-08 21:02");
			list.add(map);
			map = new HashMap<String, Object>();
			map.put("score_text", "又回到武汉了，汉口火车站变的干净美观不少。");
			map.put("score_person", "来自" + "万佩");
			map.put("score_time", "12-09-08 23:02");
			list.add(map);
			map = new HashMap<String, Object>();
			map.put("score_text", "独在异乡为异客 ，每逢佳节。。。胖。。。三。。。斤！！！");
			map.put("score_person", "来自" + "曾小贤 ");
			map.put("score_time", "12-09-12 14:02");
			list.add(map);
			map = new HashMap<String, Object>();
			map.put("score_text", "母校，生快~~");
			map.put("score_person", "来自" + "小胡");
			map.put("score_time", "12-09-08 21:02");
			list.add(map);
			map = new HashMap<String, Object>();
			map.put("score_text", "同学在学生会吧 过节请客吃饭是他们固有程序 学生会越来越廉价了 15块钱打发了");
			map.put("score_person", "来自" + "李宏模 ");
			map.put("score_time", "12-09-08 21:02");
			list.add(map);
			map = new HashMap<String, Object>();
			map.put("score_text", "大学四年顶个球");
			map.put("score_person", "来自" + "许梦逸");
			map.put("score_time", "12-10-08 21:02");
			list.add(map);
		return list;
	}
	
}
